package com.ruoyi.washer.service.impl;

import java.util.List;

import com.ruoyi.washer.model.DivideAccountsQueryByMonthReq;
import com.ruoyi.washer.model.DivideAccountsQueryByMonthRes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.washer.mapper.XwDivideAccountsMapper;
import com.ruoyi.washer.domain.XwDivideAccounts;
import com.ruoyi.washer.service.IXwDivideAccountsService;

/**
 * 分账处理Service业务层处理
 * 
 * @author hawking
 * @date 2023-12-15
 */
@Service
public class XwDivideAccountsServiceImpl implements IXwDivideAccountsService 
{
    @Autowired
    private XwDivideAccountsMapper xwDivideAccountsMapper;

    /**
     * 查询分账处理
     * 
     * @param divideAccountsId 分账处理主键
     * @return 分账处理
     */
    @Override
    public XwDivideAccounts selectXwDivideAccountsByDivideAccountsId(Long divideAccountsId)
    {
        return xwDivideAccountsMapper.selectXwDivideAccountsByDivideAccountsId(divideAccountsId);
    }

    /**
     * 查询分账处理列表
     * 
     * @param xwDivideAccounts 分账处理
     * @return 分账处理
     */
    @Override
    public List<XwDivideAccounts> selectXwDivideAccountsList(XwDivideAccounts xwDivideAccounts)
    {
        return xwDivideAccountsMapper.selectXwDivideAccountsList(xwDivideAccounts);
    }

    /**
     * 新增分账处理
     * 
     * @param xwDivideAccounts 分账处理
     * @return 结果
     */
    @Override
    public int insertXwDivideAccounts(XwDivideAccounts xwDivideAccounts)
    {
        return xwDivideAccountsMapper.insertXwDivideAccounts(xwDivideAccounts);
    }

    /**
     * 修改分账处理
     * 
     * @param xwDivideAccounts 分账处理
     * @return 结果
     */
    @Override
    public int updateXwDivideAccounts(XwDivideAccounts xwDivideAccounts)
    {
        return xwDivideAccountsMapper.updateXwDivideAccounts(xwDivideAccounts);
    }

    /**
     * 批量删除分账处理
     * 
     * @param divideAccountsIds 需要删除的分账处理主键
     * @return 结果
     */
    @Override
    public int deleteXwDivideAccountsByDivideAccountsIds(Long[] divideAccountsIds)
    {
        return xwDivideAccountsMapper.deleteXwDivideAccountsByDivideAccountsIds(divideAccountsIds);
    }

    /**
     * 删除分账处理信息
     * 
     * @param divideAccountsId 分账处理主键
     * @return 结果
     */
    @Override
    public int deleteXwDivideAccountsByDivideAccountsId(Long divideAccountsId)
    {
        return xwDivideAccountsMapper.deleteXwDivideAccountsByDivideAccountsId(divideAccountsId);
    }

    @Override
    public List<DivideAccountsQueryByMonthRes> queryByMonth(DivideAccountsQueryByMonthReq divideAccountsQueryByMonthReq) {
        return xwDivideAccountsMapper.queryByMonth(divideAccountsQueryByMonthReq);
    }
}
